package com.malguy.controllers;

import com.malguy.entity.user;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.View;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author malguy-wang sir
 * @create ---
 */
@Controller
@RequestMapping("/HELLO")
public class controller1 {
    @RequestMapping(value = {"/hi","/hhh"},method = {RequestMethod.GET,RequestMethod.POST})
    public ModelAndView hi(){
        return new ModelAndView("hi");
    }
    @RequestMapping("/hh")
    public ModelAndView hh(){
        ModelAndView hh = new ModelAndView("hh");
        hh.addObject("h1","hh1");
        return hh;
    }
}
